package main

import (
	_ "hello/routers"

	"github.com/astaxie/beego/orm"

	"github.com/astaxie/beego"
)

func main() {
	mysqluser := beego.AppConfig.String("mysqluser")
	mysqlpwd := beego.AppConfig.String("mysqlpass")
	mysqldb := beego.AppConfig.String("mysqldb")
	mysqlhost := beego.AppConfig.String("mysqlurls")
	orm.RegisterDataBase("default", "mysql", mysqluser+":"+mysqlpwd+"@tcp("+mysqlhost+":3306)/"+mysqldb+"?charset=utf8", 30)
	orm.RunSyncdb("default", false, true)
	orm.Debug = true
	beego.Run()
}
